// var r;
// var AL_GAME_HUA_PopupSelf = require("../../AL_GAME_HUA/scripts/AL_GAME_HUA_PopupSelf");
// var s = cc._decorator;
// var f = s.ccclass;
// var l =
//     (s.property,
//     (function (e) {
//         function t() {
//             return (null !== e && e.apply(this, arguments)) || this;
//         }
//         __extends(t, e);
//         t.prototype.start = function () {};
//         t.prototype.handle_button_callback = function (e, t) {
//             switch (t) {
//                 case "close":
//                     this.close();
//             }
//         };
//         return __decorate([f], t);
//     })(AL_GAME_HUA_PopupSelf.default));
// exports.default = l;




// var HDPP_PopupSelf = require("../../AL_GAME_HUA/scripts/AL_GAME_HUA_PopupSelf").default;
// var decorator = cc._decorator;
// var ccclassDecorator = decorator.ccclass;

// /**
//  * This class extends HDPP_PopupSelf and is used to handle popup behaviour.
//  */
// var PopupHandler = (function (ParentClass) {
//     /**
//      * PopupHandler constructor inheriting from ParentClass.
//      * @returns {PopupHandler} instance of PopupHandler.
//      */
//     function PopupHandler() {
//         return (null !== ParentClass && ParentClass.apply(this, arguments)) || this;
//     }

//     // Inherit from ParentClass
//     __extends(PopupHandler, ParentClass);

//     /**
//      * Lifecycle method 'start', executed during the start of a component’s lifecycle.
//      */
//     PopupHandler.prototype.start = function () {};

//     /**
//      * Handles button callbacks depending on the button type.
//      * @param {Event} event - The event triggered by the button.
//      * @param {string} buttonType - The type of the button triggering action.
//      */
//     PopupHandler.prototype.handle_button_callback = function (event, buttonType) {
//         switch (buttonType) {
//             case "close":
//                 this.close();
//                 break;
//         }
//     };

//     return __decorate([ccclassDecorator], PopupHandler);
// })(HDPP_PopupSelf);

// exports.default = PopupHandler;



// 引入AL_GAME_HUA_PopupSelf模块
const AL_GAME_HUA_PopupSelf = require("../../AL_GAME_HUA/scripts/AL_GAME_HUA_PopupSelf");

// 引入 Cocos Creator 的装饰器
const { ccclass, property } = cc._decorator;

/**
 * 弹窗逻辑类，继承自AL_GAME_HUA_PopupSelf
 */
@ccclass
class PopupSelf extends AL_GAME_HUA_PopupSelf.default {
    /**
     * 生命周期 start 函数
     * 在节点首次激活时调用
     */
    start() {
        // 此处可添加初始化逻辑
    }

    /**
     * 按钮点击回调处理函数
     * @param {cc.Event} event 点击事件
     * @param {string} type 按钮类型
     */
    handle_button_callback(event, type) {
        switch (type) {
            case "close":
                this.close(); // 调用父类的关闭方法
                break;
            default:
                console.warn(`Unhandled button type: ${type}`);
                break;
        }
    }
}

// 导出类为默认模块
exports.default = PopupSelf;
